classdef ziScopeTrigInput < uint32
    %ZISCOPETRIGINPUT Summary of this class goes here
    %   Detailed explanation goes here
    enumeration
      SigIn    (0)
      CurrIn   (1)
      TrigIn1  (2)
      TrigIn2  (3)
      
      AuxOut1  (4)      
      AuxOut2 (5)
      AuxOut3 (6)
      AuxOut4 (7)
      AuxIn1 (8)
      AuxIn2 (9)
      OscPhi2 (10)
      OscPhi4 (11)
      
      Demod1X (16)
      Demod2X (17)
      Demod3X (18)
      Demod4X (19)
      Demod1Y (32)
      Demod2Y (33)
      Demod3Y (34)
      Demod4Y (35)
      Demod1R (48)
      Demod2R (49)
      Demod3R (50)
      Demod4R (51)
      Demod1Theta (64)
      Demod2Theta (65)
      Demod3Theta (66)
      Demod4Theta (67)
      
      PID1Value (80)
      PID2Value (81)
      PID3Value (82)
      PID4Value (83)
      PID1Shift (144)
      PID2Shift (145)
      PID3Shift (146)
      PID4Shift (147)
      PID1Error (208)
      PID2Error (209)
      PID3Error (210)
      PID4Error (211)
            
      TU1Filtered (224)
      TU2Filtered (225)
      TU3Filtered (226)
      TU4Filtered (227)
    end
    methods (Static)
        function tf = test(val)
            if isnumeric(val) && length(val) == 1
                tf = ismember(val, [0:11 16:19 32:35 48:51 64:67 80:83 144:147 208:211 224:227]);
            else
                tf = false;
            end
        end
    end
    methods
        function name = toString(obj)
            [~, nameList] = enumeration('ziScopeTrigInput');
            nameCell = nameList(obj==[0:11 16:19 32:35 48:51 64:67 80:83 144:147 208:211 224:227]);
            name = nameCell{1};
        end
    end
end

